<?php if (!defined('THINK_PATH')) exit();?>﻿<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="stylesheet" href="/yilianti/Public/home/js/layui/css/layui.css"/>
    <script src="/yilianti/Public/home/js/layui/layui.js"></script>
    <script src="/yilianti/Public/home/js/jquery.js" type="text/javascript" charset="utf-8"></script>
    <script src="/yilianti/Public/home/js/zepto.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="/yilianti/Public/home/js/TouchSlide.1.1.js"></script>
    <script src="/yilianti/Public/home/js/jQuery.textSlider.js"></script>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <link rel="stylesheet" href="/yilianti/Public/home/css/weui.css"/>
    <link rel="stylesheet" href="/yilianti/Public/home/css/myself.css"/>
    <script>
        layui.use('layer', function(){
            var layer = layui.layer;
        });
    </script>
</head>
<body>
<!--

-->


    <div class="login_in dengl_form">
        <div class="dl_touxiang">
            <img src="/yilianti/Public/home/img/touxiang.png" alt="">
        </div>
        <form action="" method="post" id="ajaxForm">
            <ul class="clearfix">
                <li style="border-bottom:1px solid #cdcdcd">
                    <div class="login_tips ltips01">
                        <input class="in_style" name="phone" id="phone" type="text" placeholder="请输入账号" tabindex="1" >
                        <i class="picUser"></i>
                    </div>
                </li>
                <li>
                    <div class="login_tips ltips02">
                        <input class="in_style in_style_yzm" type="password" name="password" id="userPass" placeholder="请输入密码：" tabindex="2">
                        <i class="picPassWord"></i>
                    </div>
                </li>
            </ul>
            <div class="btn_submit">
                <input id="loginButton" class="input_sub login_btn btn_primary" type="button" value="登录" tabindex="3">
            </div>
        </form>
    </div>
    <script type="text/javascript">
        $("#loginButton").click(function(){
            var phone = $("#phone").val();
            if(phone == ''){
                layer.msg('请填写账号');
                return false;
            }
            var userPass = $("#userPass").val();
            if(userPass == ''){
                layer.msg('请填写密码');
                return false;
            }
            $.ajax({
                type:'post',
                url:'/yilianti/index.php/Login/index',
                data:$('#ajaxForm').serialize(),
                cache:false,
                dataType:'json',
                success:function(res){
                    if(res.code == 0){
                        layer.msg(res.msg,{time:2000},function () {
                            window.location.href = res.url;
                        });
                        return false;
                    }else{
                        layer.msg(res.msg);
                        return false;
                    }
                }
            });
        });
    </script>




</body>
</html>